package org.alis.rpc.common.contant;

import org.alis.rpc.common.bean.RpcRequest;

/**
 * RpcConstants desc:
 *
 * @author luochuan
 * @date 2020/9/30
 */
public final class RpcConstants  {
    private RpcConstants(){}

    public static final int BEAT_INTERVAL = 30;
    public static final int BEAT_TIMEOUT = 3 * BEAT_INTERVAL;
    public static final String BEAT_ID = "BEAT_PING_PONG";

    private static final RpcRequest BEAT_PING;

    static {
        BEAT_PING = new RpcRequest() {};
        BEAT_PING.setRequestId(BEAT_ID);
    }

    public static RpcRequest getBeatPing(){
        return BEAT_PING;
    }

}
